package it.unibo.imola.parser.visitor.entity;


public class FloatDeclaration extends DeclarationStatement {

	private Float value;
	
	public FloatDeclaration(String varName, Float value) {
		super(varName);
		if(value==null)
			throw new IllegalArgumentException("value==null");
		this.value = value;
	}

	/**
	 * @return the value
	 */
	public Float getValue() {
		return value;
	}

	@Override
	protected void setVariable(Environment env) {
		Variable var = new Variable(varName, value);
		env.getVariables().put(varName, var);		
	}
}
